<template>
	<div class="page page-stadium-detail has-headbar">
		<head-bar :title="$route.meta.title" :prevRoute="{name: 'voice-list'}"/>
		<ul class="user-page">
			<li>
				<div class="info">
					<div class="head">
						<h3>{{discussantName}}：</h3>
					</div>
					<div class="body">
						<div class="content" v-html="content"></div>
					</div>
				</div>
			</li>
			<li v-if="status !== 0">
				<div class="info">
					<div class="head">
						<h3>官方回复：</h3>
					</div>
					<div class="body">
						<div class="html-content" v-html="replyContent"></div>
					</div>
				</div>
			</li>
		</ul>
	</div>
</template>

<script>
import { API_CITIZEN_COMMENT_DETAIL } from '@/service/voice'
export default {
  name: 'voice-detail',
  data () {
	  return {
      discussantName: '',
	    content: '',
	    replyContent: '',
	    status: 0
	  }
  },
  mounted () {
    this.requestData()
  },
  methods: {
    requestData () {
      API_CITIZEN_COMMENT_DETAIL(this.$route.params.id).then((resData) => {
        let info = resData.info
        this.discussantName = info.discussantName
        this.content = info.content
        this.replyContent = info.replyContent
        this.status = info.status
      })
    }
  }
}
</script>

<style lang="less" scoped>
	@import './../../assets/styles/user.less';
	.info{flex:1;}
	@import "../../assets/styles/htmlcontent.less";
</style>
